import Cookies from "js-cookie";

const Token = "token";
const SysArr = "sysArr";

export function getToken() {
  return Cookies.get(Token);
}

export function setToken(token) {
  return Cookies.set(Token, token);
}

export function removeToken() {
  return Cookies.remove(Token);
}

//保存下拉系统数组
export function setSysArr(data) {
  console.log(
    data,
    "cookie中保存data-----------2222222222---------------------------------------------------------------------"
  );

  return Cookies.set(SysArr, JSON.stringify(data));
}

// 拿到下拉系统数组

export function getSysArr() {
  return JSON.parse(Cookies.get(SysArr));
}

// 删除token
export function removeSysArr() {
  return Cookies.remove(SysArr);
}

export const AppKey = "a3cf37592ef44399b20a9010d8618341";
export const Secret = "0182c0271603db255ebd5a5beeac2e8e";
